SaveState
Method for saving PersistedState to SharedPreferences. Serializes the object and stores it in SharedPreferences using the key and commits the changes to SharedPreferences
Parameters
application
persistedState
The PersistedState to save
Throws
potential exceptions during serialization